import UserLayout from '@/layouts/UserLayout';

import Register from '@/pages/Register';
import BasicLayout from '@/layouts/BasicLayout';
import Solution from '@/pages/Solution';
import Analysis from '@/pages/Analysis';
import Monitor from '@/pages/Monitor';
import Workplace from '@/pages/Workplace';
import FormBasic from '@/pages/FormBasic';
import FormTwo from '@/pages/FormTwo';
import FormThree from '@/pages/FormThree';
import FormFour from '@/pages/FormFour';
import FormStep from '@/pages/FormStep';
import FormClassified from '@/pages/FormClassified';
import FormHierarchical from '@/pages/FormHierarchical';
import FormGroup from '@/pages/FormGroup';
import FlowGroup from '@/pages/FlowGroup';
import BasicDetailPage from '@/pages/BasicDetailPage';
import Advanced from '@/pages/Advanced';
import BasicListPage from '@/pages/BasicListPage';
import CardListPage from '@/pages/CardListPage';
import TableListPage from '@/pages/TableListPage';
import FeedbackFail from '@/pages/FeedbackFail';
import FeedbackSuccess from '@/pages/FeedbackSuccess';
import FeedbackForbidden from '@/pages/FeedbackForbidden';
import FeedbackNotFound from '@/pages/FeedbackNotFound';
import FeedbackServerError from '@/pages/FeedbackServerError';
import Settings from '@/pages/Settings';
import Person from '@/pages/Person';
import LoginInterceptor from '@/components/LoginInterceptor';
// 开发
import UserTableListPage from '@/pages/UserTableListPage';
import CourseTableListPage from '@/pages/CoursePage';
import CourseChapterTableListPage from '@/pages/CourseChapterPage';
import CourseQuestionTableListPage from '@/pages/CourseQuestionPage';
import ExamPaperTableListPage from '@/pages/ExamPaperPage';
import ExamPaperQuestionTableListPage from '@/pages/ExamPaperQuestionPage';
import VersionPage from '@/pages/VersionPage';
import RotationImagePage from '@/pages/RotationImagePage';
import ExamTipPage from '@/pages/ExamTipPage';
import Login from '@/pages/Login';

const routerConfig = [
  {
    path: '/register',
    component: UserLayout,
    children: [
      {
        path: '/',
        component: Register,
      },
    ],
  },
  {
    path: '/loginInterceptor',
    component: UserLayout,
    children: [
      {
        path: '/',
        component: LoginInterceptor,
      },
    ],
  },
  {
    path: '/login',
    component: UserLayout,
    children: [
      {
        path: '/',
        component: Login,
      },
    ],
  },
  {
    path: '/',
    component: BasicLayout,
    children: [
      {
        path: '/appUser/list',
        component: UserTableListPage,
      },
      {
        path: '/course/list',
        component: CourseTableListPage,
      },
      {
        path: '/chapter/list',
        component: CourseChapterTableListPage,
      },
      {
        path: '/question/list',
        component: CourseQuestionTableListPage,
      },
      {
        path: '/examPaper/list',
        component: ExamPaperTableListPage,
      },
      {
        path: '/examPaperQuestion/list',
        component: ExamPaperQuestionTableListPage,
      },    
      {
        path: '/version/list',
        component: VersionPage,
      },    
      {
        path: '/rotationImage/list',
        component: RotationImagePage,
      },  
      {
        path: '/examTip/list',
        component: ExamTipPage,
      },    
      {
        path: '/solution',
        component: Solution,
      },
      {
        path: '/dashboard/analysis',
        component: Analysis,
      },
      {
        path: '/dashboard/monitor',
        component: Monitor,
      },
      {
        path: '/dashboard/workplace',
        component: Workplace,
      },
      {
        path: '/form/basic',
        component: FormBasic,
      },
      {
        path: '/form/two',
        component: FormTwo,
      },
      {
        path: '/form/three',
        component: FormThree,
      },
      {
        path: '/form/four',
        component: FormFour,
      },
      {
        path: '/form/step',
        component: FormStep,
      },
      {
        path: '/form/classified',
        component: FormClassified,
      },
      {
        path: '/form/hierarchical',
        component: FormHierarchical,
      },
      {
        path: '/form/group',
        component: FormGroup,
      },
      {
        path: '/form/flow',
        component: FlowGroup,
      },
      {
        path: '/detail/basic',
        component: BasicDetailPage,
      },
      {
        path: '/detail/advanced',
        component: Advanced,
      },
      {
        path: '/list/basic',
        component: BasicListPage,
      },
      {
        path: '/list/card',
        component: CardListPage,
      },
      {
        path: '/list/table',
        component: TableListPage,
      },
      {
        path: '/feedback/fail',
        component: FeedbackFail,
      },
      {
        path: '/feedback/success',
        component: FeedbackSuccess,
      },
      {
        path: '/feedback/403',
        component: FeedbackForbidden,
      },
      {
        path: '/feedback/404',
        component: FeedbackNotFound,
      },
      {
        path: '/feedback/500',
        component: FeedbackServerError,
      },
      {
        path: '/settings',
        component: Settings,
      },
      {
        path: '/person',
        component: Person,
      },
      {
        path: '/already/login',
        redirect: '/appUser/list',
      },
      {
        path: '/',
        redirect: '/loginInterceptor',
        // component: LoginInterceptor,
      },
    ],
  },
];
export default routerConfig;
